<?php 
	global $ADMIN;
	/*
	CREATE TABLE `gb_posts` (
	  `id_post` int(11) NOT NULL auto_increment,
	  `comentario` longtext,
	  `fecha` datetime default NULL,
	  `autor` varchar(50) default NULL,
	  `email` varchar(50) default NULL,
	  PRIMARY KEY  (`id_post`)
	) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
	*/	

	# the code for the class
	include_once ($ADMIN["libs"].'ajaxCRUD/'.'ajaxCRUD.class.php');
	
	# this one line of code is how you implement the class
	$tblGuestbook = new AjaxCRUD("Post","gb_posts", "id_post");
	
	# don't show the primary key in the table
	//$tblGuestbook->omitPrimaryKey();
	
	# my db fields all have prefixes;
	# display headers as reasonable titles
	//$tblGuestbook->displayAs("fldFName", "First");
	//$tblGuestbook->displayAs("fldLName", "Last");
	//$tblGuestbook->displayAs("fldPaysBy", "Pays By");
	//$tblGuestbook->displayAs("fldDescription", "Customer Info");
	
	# set the height for my textarea
	//$tblGuestbook->setTextareaHeight('fldDescription', 100);
	
	# define allowable fields for my dropdown fields
	# (this can also be done for a pk/fk relationship)
	//$values = array("Cash", "Credit Card", "Paypal");
	//$tblGuestbook->defineAllowableValues("fldPaysBy", $values);
	
	# add the filter box (above the table)
	//$tblGuestbook->addAjaxFilterBox("fldFName");
	
	# actually show to the table
	//$tblGuestbook->showTable();
	
?>